package com.zxy;

public class try01 {
    public static void main(String[] args) {
        String a = string(new int[]{1, 2, 3, 4, 5, 6});
        System.out.println(a);
    }

    public static String string(int arr[]) {
        StringBuilder b001 = new StringBuilder("[");
        for (int i = 0; i < arr.length; i++) {
            if (i == arr.length - 1) {
                b001.append(arr[i]);
            } else {
                b001.append(arr[i]).append(",");
            }
        }
        b001.append("]");
        return b001.toString();
    }
}
